package com.emergency.base.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.persistence.*;
import java.util.Date;

/**
 * 想定文件选择装备类
 * */
@Entity
@Table(name="bus_scenar_equipment")
public class ScenarEquipment extends BaseEntity{

    /**装备*/
    @OneToOne(targetEntity=Equipment.class,fetch= FetchType.EAGER)
    @JoinColumn(name="equipment_id",referencedColumnName="id")
    private Equipment equipment;

    /**想定*/
    @JsonIgnore
    @OneToOne(targetEntity=Scenar.class,fetch= FetchType.EAGER)
    @JoinColumn(name="scenar_id",referencedColumnName="id")
    private Scenar scenar;

    public Equipment getEquipment() {
        return equipment;
    }

    public void setEquipment(Equipment equipment) {
        this.equipment = equipment;
    }

    public Scenar getScenar() {
        return scenar;
    }

    public void setScenar(Scenar scenar) {
        this.scenar = scenar;
    }
}
